<% form_remote_for :bill, :url => { :action => 'add' } do |f| -%>
<h2>Create Bill</h2>

<div class="row">
  <label>Name</label>
  <%= f.text_field :name, :class => 'field' %>
</div>

<div class="row">
  <label>Amount</label>
  <%= f.text_field :amount, :class => 'field' %>
</div>

<div class="row">
  <label>Account</label>
  <%= f.select :account_id, current_user.accounts.collect {|a| [a.name, a.id]}, :class => 'field' %>
</div>

<div class="row">
  <label>Due</label>
  <%= date_select 'bill', 'due', :class => 'field' %>
</div>


<%= submit_tag 'Create Bill', :class => 'submit' %>
<%= link_to_remote 'Cancel', :url => { :action => 'destroy', :id => 'new-bill' } %>
<% end -%>
